@import '~@/theme.less';
@currency-font: DINAlternate-Bold, DINAlternate, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Apple Color Emoji',
    'Segoe UI Emoji', 'Segoe UI Symbol';

@label-color: rgba(0, 0, 0, 0.3);
@label-color: rgba(0, 0, 0, 0.3);

/* 金额显示样式 */
.currency {
    font-weight: bold;
    font-family: @currency-font;
    font-size: 16px;
}

.linkBtn {
    padding-right: 0;
    padding-left: 0;

    :global {
        .iconfont {
            font-size: 1.286em;
            vertical-align: bottom;

            & + span {
                margin-left: 2px;
                font-size: 1em;
            }
        }
    }
}

/* 方形图标按钮 */
.squareIconBtn {
    box-sizing: border-box !important;
    width: 24px !important;
    height: 24px !important;
    padding: 0 0 0 0 !important;
    vertical-align: middle;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 3px !important;
}

/* font-size: 22px的icon */
.iconfont22 {
    font-size: 22px;
}

/* 图标按钮 */
.iconBtn {
    height: auto;
    padding-right: 0;
    padding-left: 0;
    background: transparent;
    border: none;
    &:hover {
        background: transparent;
    }

    :global {
        // 禁用状态下
        .ant-btn,
        .ant-btn[disabled] {
            height: auto;
            padding-right: 0;
            padding-left: 0;
            background: transparent;
            border: none;
        }
    }
}

/* 操作按钮图标 */
.operateIcon {
    .iconBtn;
    @fontSize: 22px;

    font-size: @fontSize;
    box-shadow: none;
    :global {
        .iconfont {
            font-size: @fontSize;
            vertical-align: bottom;
        }
    }

    &:hover,
    &:focus,
    &:active {
        :global {
            // 删除按钮hover为红色
            .iconfont.iconDeleteIcon {
                color: #fe2525 !important;
            }

            // 禁用状态下的删除按钮不显示红色
            [disabled] {
                .iconfont.iconDeleteIcon {
                    color: rgba(0, 0, 0, 0.25) !important;
                }
            }
        }
    }
}

.circle {
    display: inline-block;
    &::before {
        display: inline-block;
        width: 8px;
        height: 8px;
        background: @primary-color;
        border-radius: 1em;
        content: ' ';
    }

    &.circleHidden {
        visibility: hidden;
    }
}

.colorTagCell {
    position: relative;
    overflow: hidden;

    :global {
        .color-tag {
            position: absolute;
            top: -16px;
            right: -16px;
            display: block;
            width: 32px;
            height: 32px;
            background: @primary-color;
            transform: rotate(45deg);
            cursor: pointer;
        }
    }
}

/* 切换状态的radio group */
.switchRadio {
    padding: 2px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;

    :global {
        .ant-radio-button-wrapper {
            height: 24px;
            padding-right: 12px;
            padding-left: 12px;
            line-height: 24px;
            background: transparent;
            border: none;

            &.ant-radio-button-wrapper-checked {
                background: rgba(255, 255, 255, 0.98);
                border-radius: 3px;
                box-shadow: 0 1px 6px 0 rgba(0, 0, 0, 0.06);

                &:not(.ant-radio-button-wrapper-disabled) {
                    color: rgba(0, 0, 0, 0.65);
                }
                .iconfont {
                    color: #ffa22d;
                }
            }

            &:not(:first-child)::before {
                display: none;
            }
        }
    }
}

// 无边框tag
.noBorderTag {
    border: none;
}

.borderTable {
    border: 1px solid #e8e8e8;
    border-radius: 4px;

    :global {
        .ant-table-body {
            overflow: auto !important;
        }
    }
}

// 灰色的label
.labelSecondary {
    color: @label-color;
}

.pb0 {
    padding-bottom: 0 !important;
}
.pt0 {
    padding-top: 0 !important;
}

.ml0 {
    margin-left: 0 !important;
}

.mt0 {
    margin-top: 0 !important;
}

.mt8 {
    margin-top: 8px !important;
}

.mt22 {
    margin-top: 22px !important;
}

.ml8 {
    margin-left: 8px !important;
}

.ml12 {
    margin-left: 12px !important;
}

.ml16 {
    margin-left: 16px !important;
}

.mr0 {
    margin-right: 0 !important;
}

.mr8 {
    margin-right: 8px !important;
}

.mr12 {
    margin-right: 12px !important;
}

.mr16 {
    margin-right: 16px !important;
}

.mb0 {
    margin-bottom: 0;
}

.mb32 {
    margin-bottom: 32px !important;
}

.fontBig {
    font-size: 16px !important;
}

.flex {
    display: flex !important;

    :global {
        .ant-form-item-control-wrapper {
            flex: 1;
        }
    }
}

.textRight {
    text-align: right !important;
}

.textCenter {
    text-align: center !important;
}

.textLeft {
    text-align: left !important;
}

.bold {
    font-weight: bold !important;
}

.gutter(@number) {
    display: inline-block;
    > * + * {
        margin-left: @number;
    }

    > :last-child {
        margin-right: 0;
    }
}

.gutter8 {
    .gutter(8px);
}

.h {
    font-weight: bold;
    font-size: 16px;
    line-height: 3em;
}

.s {
    font-size: 12px;
    line-height: 17px;
}

:global(.row-hover) {
    [rowspan] {
        background: @table-row-hover-bg;
    }
}

.wordBreakDropdown {
    :global {
        .ant-select-dropdown-menu-item {
            white-space: unset;
            text-overflow: unset;
        }
    }
}

:global {
    .ant-table-tbody .p-color-red {
        color: red;
    }
}

/** 日历上月下月不需要有区别的情况 */
.pickerMonthSame {
    :global {
        .ant-calendar-last-month-btn-day:not(.ant-calendar-disabled-cell) > .ant-calendar-date,
        .ant-calendar-next-month-btn-day:not(.ant-calendar-disabled-cell) > .ant-calendar-date {
            color: rgba(0, 0, 0, 0.65);
            background: transparent;
            border: 1px solid transparent;

            &:hover {
                background: #fffbf0;
                cursor: pointer;
            }
        }
    }
}

.noBorderBottom {
    border-bottom: none;
}

.salaryWrapper {
    margin: 0;
    padding: 0 8px;
}

.salaryStaticsName{
    color: #FFA22D;
    cursor: pointer;
    &:hover{
        color: #ffb957;
    }
}
